﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JieBooLaw.WebSite
{
    using JieBooLaw.Service;
    using JieBooLaw.Domain;
    using JieBooLaw.Common.Web.Util;
    public partial class ShowInfo : System.Web.UI.Page
    {
        public TInfoRelease_Info entity;
        public string  vStitle;
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!this.IsPostBack)
            {
                BindGrid();
                TInfoRelease_ItemSvc ItmSvc = new TInfoRelease_ItemSvc();
                List<TInfoRelease_Item> itmList=(from lt in ItmSvc.GetAllList() where lt.ItemID.Equals(Convert.ToInt32(Request.QueryString["itmid"])) select lt).ToList<TInfoRelease_Item>();
                vStitle = itmList[0].ItemName;
                this.p_div.InnerHtml = "   您现在的位置：<a href='index.aspx'>首页</a> > <a href='list.aspx?id=" + Request.QueryString["itmid"] + "&itmid=" + itmList[0].PItemID + "'>" + vStitle + "</a> >  " + "正文";
            }
        }
        public void BindGrid()
        {
            TInfoRelease_InfoSvc svc = new TInfoRelease_InfoSvc();
            entity = new TInfoRelease_Info();
            entity.InfoID = Convert.ToInt32(Request.QueryString["id"]);
            entity = svc.GetByKey(entity);

        }
    }
}
